﻿<%@ Page Title="" Language="C#" MasterPageFile="~/WebMasterCP.master" AutoEventWireup="true" CodeBehind="ReplyTickets.aspx.cs" Inherits="University.Workshop.WebApp.RespondTickets" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div style=' margin-bottom:15px;background-color: #4b6c9e; color: White;'>
        <h4 style='margin-top: 4px; font-size: large; color: White; width: 615px;'>
           &nbsp;>Reply Tickets
        </h4>
    </div>
    <asp:MultiView runat="server" ID="MultiViewCanReply">
        <asp:View runat="server" ID="CanReply">
            <div style="margin-bottom: 15px;">
                <label>
                    Here you have the tickets queue, by newest order and by priority order</label>
            </div>
            <div style='margin-bottom: 15px;'>
                <h4 style='margin-top: 4px; background-color: #4b6c9e; font-size: large; color: White;
                    width: 534px; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px;'>
                    &nbsp;>Newest Tickets
                </h4>
            </div>
            <asp:ScriptManager runat="server" ID="scriptMan">
            </asp:ScriptManager>
            <div style="margin-bottom: 15px">
                <asp:MultiView runat="server" ID="MultiViewNewest">
                    <asp:View runat="server" ID="ViewNewest">
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                                <div style="height: 185px;">
                                    <asp:DataList ID="dataListNewestTickets" runat="server" Width="534px" OnItemCommand="DL_ItemCommand">
                                        <HeaderTemplate>
                                            <table style='border-collapse: collapse; border: 1; width="100%;'>
                                                <thead bgcolor="#4b6c9e" style="font-weight: bold; color: white; font-size: medium;">
                                                    <td style='height: 25px; border-right: 1px white solid;'>
                                                        Title of the Issue
                                                    </td>
                                                    <td style='border-right: 1px white solid; width: 90px;'>
                                                        Date
                                                    </td>
                                                    <td style='border-right: 1px white solid; width: 90px'>
                                                        Status
                                                    </td>
                                                    <td style='border-right: 1px white solid; width: 65px'>
                                                        Priority
                                                    </td>
                                                </thead>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <tr style='color: Black; background-color: White; border: 1px #3A4F63 solid;' <%# TRJavaScript(Container) %>>
                                                <td style='border-right: 1px #3A4F63 solid; height: 25px; font-size: medium;'>
                                                    <asp:Button Style="display: none;" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"Id")%>'
                                                        CausesValidation="false" ID="HiddenButton" runat="server" Text="View"></asp:Button>
                                                    <%# DataBinder.Eval(Container.DataItem, "IssueTitle")%>
                                                </td>
                                                <td style='border-right: 1px #3A4F63 solid; height: 25px; font-size: medium;'>
                                                    <%# DataBinder.Eval(Container.DataItem, "Date.Day")%>/<%# DataBinder.Eval(Container.DataItem, "Date.Month")%>/<%# DataBinder.Eval(Container.DataItem, "Date.Year")%>
                                                </td>
                                                <td style='border-right: 1px #3A4F63 solid; height: 25px; font-size: medium;'>
                                                    <%# DataBinder.Eval(Container.DataItem, "Status")%>
                                                </td>
                                                <td style="height: 25px; font-size: medium;">
                                                    <%# DataBinder.Eval(Container.DataItem, "Priority")%>
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            </table>
                                        </FooterTemplate>
                                    </asp:DataList>
                                </div>
                                <div>
                                    <table>
                                        <tr>
                                            <td style='width: 120px'>
                                            </td>
                                            <td>
                                                <h3 id="ShowContent" runat="server" style='margin-top: 0px'>
                                                    Showing
                                                </h3>
                                            </td>
                                            <td>
                                                <asp:Button runat="server" ID="PrevButton" Text="<- Prev." OnClick="PrevButton_Click" />
                                            </td>
                                            <td>
                                                <asp:Button runat="server" ID="NextButton" Text="Next ->" OnClick="NextButton_Click" />
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </asp:View>
                    <asp:View runat="server" ID="NoNewest">
                        <h4>
                            There are not new tickets</h4>
                    </asp:View>
                </asp:MultiView>
            </div>
            <div style='margin-bottom: 15px;'>
                <h4 style='margin-top: 4px; background-color: #4b6c9e; font-size: large; color: White;
                    width: 534px; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px;'>
                    &nbsp;>Tickets by priority
                </h4>
            </div>
            <div style="margin-bottom: 15px">
                <asp:MultiView runat="server" ID="MultiViewPriority">
                    <asp:View runat="server" ID="ViewPriority">
                        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                            <ContentTemplate>
                                <div style="height: 185px;">
                                    <asp:DataList ID="dataListPriorityTickets" runat="server" Width="534px" OnItemCommand="DL_ItemCommand">
                                        <HeaderTemplate>
                                            <table style='border-collapse: collapse; border: 1; width="100%;'>
                                                <thead bgcolor="#4b6c9e" style="font-weight: bold; color: white; font-size: medium;">
                                                    <td style='height: 25px; border-right: 1px white solid;'>
                                                        Title of the Issue
                                                    </td>
                                                    <td style='border-right: 1px white solid; width: 90px;'>
                                                        Date
                                                    </td>
                                                    <td style='border-right: 1px white solid; width: 90px'>
                                                        Status
                                                    </td>
                                                    <td style='border-right: 1px white solid; width: 65px'>
                                                        Priority
                                                    </td>
                                                </thead>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <tr style='color: Black; background-color: White; border: 1px #3A4F63 solid;' <%# TRJavaScript(Container) %>>
                                                <td style='border-right: 1px #3A4F63 solid; height: 25px; font-size: medium;'>
                                                    <asp:Button Style="display: none;" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"Id")%>'
                                                        CausesValidation="false" ID="HiddenButton" runat="server" Text="View"></asp:Button>
                                                    <%# DataBinder.Eval(Container.DataItem, "IssueTitle")%>
                                                </td>
                                                <td style='border-right: 1px #3A4F63 solid; height: 25px; font-size: medium;'>
                                                    <%# DataBinder.Eval(Container.DataItem, "Date.Day")%>/<%# DataBinder.Eval(Container.DataItem, "Date.Month")%>/<%# DataBinder.Eval(Container.DataItem, "Date.Year")%>
                                                </td>
                                                <td style='border-right: 1px #3A4F63 solid; height: 25px; font-size: medium;'>
                                                    <%# DataBinder.Eval(Container.DataItem, "Status")%>
                                                </td>
                                                <td style="height: 25px; font-size: medium;">
                                                    <%# DataBinder.Eval(Container.DataItem, "Priority")%>
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            </table>
                                        </FooterTemplate>
                                    </asp:DataList>
                                </div>
                                <div>
                                    <table>
                                        <tr>
                                            <td style='width: 120px'>
                                            </td>
                                            <td>
                                                <h3 id="ShowContent2" runat="server" style='margin-top: 0px'>
                                                    Showing
                                                </h3>
                                            </td>
                                            <td>
                                                <asp:Button runat="server" ID="PrevButton2" Text="<- Prev." OnClick="PrevButton2_Click" />
                                            </td>
                                            <td>
                                                <asp:Button runat="server" ID="NextButton2" Text="Next ->" OnClick="NextButton2_Click"
                                                    Style="height: 26px" />
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </asp:View>
                    <asp:View runat="server" ID="NoPriority">
                        <h4>
                            There are not new tickets</h4>
                    </asp:View>
                </asp:MultiView>
            </div>
        </asp:View>
        <asp:View runat="server" ID="NoReplyPriv">
            <h4>You have not required privileges to reply tickets!</h4>
        </asp:View>
    </asp:MultiView>
</asp:Content>
